package com.example.demo.utils;

public class RunnableUtil implements Runnable {

    @Override
    public void run() {
        for (int i = 0; i < 10; i++) {
            System.out.println("子线程" + Thread.currentThread().getName() + ":" + i);
            try {
                Thread.sleep(1000);
                //Thread.sleep(Integer.MAX_VALUE);
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
        }
    }
}
